package com.ruoyi.web.controller.situation;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.control.service.IJingxiaHistoryService;
import com.ruoyi.pressure.service.IKyLaneDblcRealService;
import com.ruoyi.safety.dto.AdressDto;
import com.ruoyi.safety.service.ISafetyPointRealTimeService;
import com.ruoyi.safety.vo.AdressVo;
import com.ruoyi.tube.service.ISgcdssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RestController
@RequestMapping("/situ")
public class SituController {
    @Autowired
    private ISafetyPointRealTimeService safetyPointRealTimeService;
    @Autowired
    private IKyLaneDblcRealService kyLaneDblcRealService;
    @Autowired
    private IJingxiaHistoryService jingxiaHistoryService;
    @Autowired
    private ISgcdssService sgcdssService;
    /**
     * 查询地点管理列表
     */
    @GetMapping("/getRate")
    public int getRate()
    {
        int jgjw = safetyPointRealTimeService.getCountOver();
        int yyht = safetyPointRealTimeService.getYyhtan();
        int dbwy = kyLaneDblcRealService.getDbwy();
        int ssll = jingxiaHistoryService.getSsll();
        int suguan = 0;
        int dust = 0;
        int i = (10 -jgjw) * 2  + (10 - yyht) * 1 + (10 - dbwy) * 2 + (10 - ssll) + (10 -suguan) * 2 + (10 -dust) * 2;
        return i;
    }

}
